<!DOCTYPE html>
<html>
<head lang="en">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0,user-scalable=no" />
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="full-screen" content="true"/>
    <meta name="screen-orientation" content="portrait"/>
    <meta name="x5-fullscreen" content="true"/>
    <meta name="360-fullscreen" content="true"/>
    <meta charset="UTF-8">
    <title>钢琴大师</title>
    <meta name="keywords" content="钢琴大师,菠萝玩公众平台,HTML5"/>
    <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>

<style>
    body {
        text-align: center;
        background: #000000;
        padding: 0;
        border: 0;
        margin: 0;
        height: 100%;
    }
    html {
        -ms-touch-action: none; /* Direct all pointer events to JavaScript code. */
        overflow: hidden;
    }
    canvas {
        background:#fffdcf;
        display:block;
        position:absolute;
        margin: 0 auto;
        padding: 0;
        border: 0;
    }
</style>
    <script type="text/javascript" src="js/g.js"></script>
		<link rel="stylesheet" type="text/css" href="css/game9g.css">
</head>

<body onload="g.init();">
<div style="position:relative;">
    <canvas id="gameCanvas" width="640px" height="1136px"></canvas>
</div>
<div id="share" style="display: none">
	<img src="./img/share.png"
		style="position: fixed; z-index: 9999; top: 0; right: 0; display: "
		ontouchstart="document.getElementById('share').style.display='none';" />
</div>
<script src="js/d3003424.meiriq-screen-vertical.js"></script>
<script src="js/meiriq_loading.js"></script>
<script src="js/meiriq_game.js"></script>
<script src="js/jquery.min.js" language="JavaScript"></script>

<script>
    // 传入游戏英文名,分数类型为score 或者 level
    // 注意!!这里命名一定是meiriq_game,请不要私自命名
    var meiriq_game = new Meiriq_game("masterpianist", "score");
    window["meiriq_game"].permitStart=1;  //这里需要自己修改参数测试一下 如果是1允许开始 0则不允许开始游戏
</script>
<script language=javascript>
        var score;
        window.shareData = {
		    "imgUrl": "http://wx.iooook.com/game/gqds/icon.png",
		    "timeLineLink": "http://wx.iooook.com/game/gqds/index.html",
		    "homeurl":"http://wx.iooook.com",
		    "tTitle": "钢琴大师",
		    "tContent": "钢琴大师,最好玩的指尖游戏...."
		};
        var url = location.href;
        $.get("http://wx.iooook.com/WeiXin/SDKAction/JsBridge",{url:url},function(data){
            wx.config({
                appId : data.appId,
                timestamp : data.timestamp,
                nonceStr: data.nonceStr,
                signature: data.signature,
                jsApiList : [
                    "onMenuShareTimeline",
                    "onMenuShareAppMessage"
                ]
            });
        })

		function goHome(){
			window.location = window.shareData.homeurl;
		}
		function clickMore(){
			window.location = window.shareData.homeurl;
		}
		function dp_share(){
			document.getElementById("share").style.display="";
            wx.ready(function (){
                wx.onMenuShareTimeline({
                    title: window.shareData.tTitle, // 分享标题
                    link: window.shareData.timeLineLink, // 分享链接
                    imgUrl: window.shareData.imgUrl, // 分享图标
                    success: function () {
                        // 用户确认分享后执行的回调函数
                    },
                    cancel: function () {
                        // 用户取消分享后执行的回调函数
                    }
                });
                wx.onMenuShareAppMessage({
                    title: window.shareData.tTitle, // 分享标题
                    desc: window.shareData.tContent, // 分享描述
                    link: window.shareData.timeLineLink, // 分享链接
                    imgUrl: window.shareData.imgUrl, // 分享图标
                    type: '', // 分享类型,music、video或link，不填默认为link
                    dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
                    success: function () {
                        // 用户确认分享后执行的回调函数
                    },
                    cancel: function () {
                        // 用户取消分享后执行的回调函数
                    }
                });
            });
		}
		function dp_Ranking(){
			window.location = window.shareData.homeurl;
		}

		function showAd(){
		}
		function hideAd(){
		}
		function dp_submitScore(score){
			if(score>0){
				window.shareData.tTitle = "我在钢琴大师中获得了" + score + "分！快来试试你的音乐水平吧！";
				window.shareData.tContent = "钢琴大师，最好玩的指尖游戏";
			}
		}


	</script>
</body>
</html>